﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" 
    xmlns:uriMapper="clr-namespace:System.Windows.Navigation;assembly=System.Windows.Controls.Navigation"
    xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:aspire="clr-namespace:Aspire;assembly=Aspire"
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
    x:Class="Aspire.App.MainPage"
    mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480">
    <UserControl.Resources>
        <Style x:Key="MenuItemStyle" TargetType="telerik:RadMenuItem">
            <Setter Property="Header" Value="{Binding Name}"/>
            <Setter Property="ItemsSource" Value="{Binding Functions}"/>
        </Style>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot">
        <Grid x:Name="SystemHeaderGrid" Style="{StaticResource SystemHeadeGridrStyle}">
            <ContentControl x:Name="SystemHeader" Content="{Binding}" Style="{StaticResource SystemHeaderStyle}"/>
        </Grid>
        <Grid x:Name="SystemMenuGrid" Style="{StaticResource SystemMenuGridStyle}" >
            <ContentControl x:Name="SystemMenu" Content="{Binding Functions}" Style="{StaticResource SystemMenuStyle}" />
        </Grid>
        <Grid x:Name="MainRegionGrid" Style="{StaticResource MainRegionGridStyle}">
            <navigation:Frame x:Name="ContentFrame" Navigated="ContentFrame_Navigated" NavigationFailed="ContentFrame_NavigationFailed">
                <navigation:Frame.ContentLoader>
                    <aspire:ContentLoader/>
                </navigation:Frame.ContentLoader>
            </navigation:Frame>
        </Grid>
    </Grid>

</UserControl>